package com.djsearch.ui;

import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.djsearch.R;
import com.djsearch.controller.JSONResp;

/**
 * 充值页面
 * @author yx
 *
 */
public class RechargeActivity extends BaseActivity{

	Button back;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().requestFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.recharge_layout);
		//得到屏幕的分辨率
		getDisPlayMetrics();
		//初始化主界面
		initView();
		//初始化主界面相关点击事件
		initOnClick();
		//初始化handler
		initHandler();
	}
	
	
	@Override
	void initHandler() {
		// TODO Auto-generated method stub
		
	}

	@Override
	void initView() {
		// TODO Auto-generated method stub
		back=(Button)findViewById(R.id.btnBack);
	}

	@Override
	void initOnClick() {
		// TODO Auto-generated method stub
		back.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				startActivity(RechargeActivity.this, MainActivity.class, 1);
			}
		});
	}


	/**
	 * 点击返回键
	 */
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub
		
		if (keyCode == KeyEvent.KEYCODE_BACK) {
			startActivity(RechargeActivity.this, MainActivity.class, 1);
		}
		return false;
	}
	
	@Override
	void getDataToResolve(JSONResp response) {
		// TODO Auto-generated method stub
		
	}

}
